FROM anapsix/alpine-java:8_server-jre_unlimited
# 使用镜像加速地址
#FROM registry.cn-hangzhou.aliyuncs.com/dby_public/alpine-java:8-arthas-with-start


RUN mkdir -p /rec-recommend

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk update && apk add curl busybox-extras tzdata \
&& cp -r -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

WORKDIR /rec-recommend

ARG JAR_FILE=target/*.jar

COPY ${JAR_FILE} app.jar

EXPOSE 18081

ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom","-Dnacos.use.endpoint.parsing.rule=false","-Dnacos.use.cloud.namespace.parsing=false","-jar","app.jar"]

CMD ["--spring.profiles.active=docker"]
